<?php
class Order extends EnhancedModel {
    static $attr_protected = array("id","created_at","dispatched");

    static $validates_presence_of = array(
        array('address'),
        array('creditcard')
    );

    static $belongs_to = array(
        array('user','select' => 'id,name,email')
    );

    static $has_many = array(
        array('order_items')
    );
}
?>
